package com.haozi.ehub.admin.autoconfig;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;

/**
 * @author ：terry
 * @date ：Created in 2020/7/1 10:18
 * @description：TODO
 * @version: 1.0
 */
@Configuration
@ConfigurationProperties(
        prefix = "pass"
)
public class PassProperties {
    public PassProperties() {
    }

    /**
     * 内部类可以不同@NestedConfigurationProperty注解
     */
    private PassProperties.Element element = new PassProperties.Element();
    /**
     * 内部类可以不同@NestedConfigurationProperty注解
     */
    private PassProperties.Url url = new PassProperties.Url();

    public PassProperties.Element getElement() {
        return element;
    }
    public void setElement(PassProperties.Element element) {
        this.element = element;
    }

    public PassProperties.Url getUrl() {
        return url;
    }
    public void setUrl(PassProperties.Url url) {
        this.url = url;
    }



    public static class Url{
        public Url(){}

        private List<String> passUri = new ArrayList<>();

        public List<String> getPassUri() {
            return passUri;
        }
        public void setPassUri(List<String> passUri) {
            this.passUri = passUri;
        }
    }


    public static class Element{
        public Element(){}

        private String loginUrl;
        private String loginOutUrl;
        private String privateKey;
        private String publicKey;

        public String getLoginUrl() {
            return loginUrl;
        }
        public void setLoginUrl(String loginUrl) {
            this.loginUrl = loginUrl;
        }

        public String getLoginOutUrl() {
            return loginOutUrl;
        }
        public void setLoginOutUrl(String loginOutUrl) {
            this.loginOutUrl = loginOutUrl;
        }

        public String getPrivateKey() {
            return privateKey;
        }
        public void setPrivateKey(String privateKey) {
            this.privateKey = privateKey;
        }

        public String getPublicKey() {
            return publicKey;
        }
        public void setPublicKey(String publicKey) {
            this.publicKey = publicKey;
        }
    }
}
